package com.pic.others.controller;


import com.pic.common.utils.R;
import com.pic.others.domain.po.Picture;
import com.pic.others.domain.po.PictureDescribe;
import com.pic.others.service.IPictureDescribeService;
import com.pic.others.service.IPictureService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RequiredArgsConstructor
@RestController
@RequestMapping("/picture-describe")
@Api("关于图片描述操作")
public class PictureDescribeController {
    private final IPictureService pictureService;
    private final IPictureDescribeService pictureDescribeService;

    @ApiOperation("生成描述和获取描述一个接口")
    @GetMapping("/chat/{pictureId}")
    public R<PictureDescribe> getDescribeByChat(@PathVariable("pictureId") Long pictureId){
        return pictureDescribeService.chatBydescribe(pictureId);
    }



}
